package com.caigou.controller;

import com.caigou.bean.cms.param.ChannelHotSearchPrams;
import com.caigou.service.ChannelHotSearchService;
import com.caigou.util.Result;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/channelHotSearch")
public class ChannelHotSearchController {

    @Resource
    private ChannelHotSearchService channelHotSearchService;

    // 获取热搜列表数据
    @RequestMapping("/loadChannelHotSearchData")
    public Result loadChannelHotSearchData(@RequestBody ChannelHotSearchPrams prams){
        return channelHotSearchService.loadChannelHotSearchData(prams);
    }

    // 更新热搜列表数据
    @RequestMapping("/updateChannelHotSearchData")
    public Result updateChannelHotSearchData(@RequestBody ChannelHotSearchPrams prams){
        return channelHotSearchService.updateChannelHotSearchData(prams);
    }

    // 获取热搜可更改项
    @RequestMapping("/loadUpdateOption")
    public Result loadUpdateOption(){
        return channelHotSearchService.loadUpdateOption();
    }
}
